import axios from '../AxiosConfig.js'

export const createPermission = data => {
  return axios({
    method: 'post',
    url: '/api/permission',
    data: data
  })
}

export const deletePermission = ukId => {
  return axios({
    method: 'delete',
    url: '/api/permission',
    params: {"ukId": ukId}
  })
}

export const updatePermission = data => {
  return axios({
    method: 'put',
    url: '/api/permission',
    data: data
  })
}

export const listPermission = (name) => {
  return axios({
    method: 'get',
    url: '/api/permission/list',
    params: {"name": name}
  })
}


